package org.example.game.history;

/**
 * @Description: TODO
 * @Author wyatt
 * @Data 2024/07/07 10:33
 */
public class Solution100339 {

    public static void main(String[] args) {
        System.out.println(new Solution100339().getEncryptedString("dart", 4));
    }


    public String getEncryptedString(String s, int k) {
        StringBuilder res = new StringBuilder();

        k = k%s.length();

        if(k == 0){
            return s;
        }

        for (int i = 0; i < s.length(); i++) {
            res.append(s.charAt((i + k) % s.length()));
        }

        return res.toString();
    }

}
